package com.techthinker.dreamBuilder.Activitites;

import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import com.techthinker.dreamBuilder.R;
import com.techthinker.dreamBuilder.widget.Learn_CircleFlowIndicator;
import com.techthinker.dreamBuilder.widget.Learn_ViewFlow;
import com.techthinker.dreamBuilder.widget.adpters.Learn_ListItemAdapter;

public class Learn_selectListActivity extends Activity {
	private Learn_ViewFlow viewFlow;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// fullscreen mode
		int flag = WindowManager.LayoutParams.FLAG_FULLSCREEN;
		Window myWindow = this.getWindow();
		myWindow.setFlags(flag, flag);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		
		int dictionary_id;
		dictionary_id=this.getIntent().getIntExtra("dictionary_id",1);

		setContentView(R.layout.learn_selectlistflow);

		viewFlow = (Learn_ViewFlow) findViewById(R.id.learn_listItemFlow);
		viewFlow.setAdapter(new Learn_ListItemAdapter(this,dictionary_id), 0);
		Learn_CircleFlowIndicator indic = (Learn_CircleFlowIndicator) findViewById(R.id.learn_listItemIndic);
		viewFlow.setFlowIndicator(indic);
	}

	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
		viewFlow.onConfigurationChanged(newConfig);
	}
}